package com.xyy.saas.payment.adpater.yzh;

import com.xyy.saas.payment.adpater.yzh.request.Request;
import com.xyy.saas.payment.adpater.yzh.util.OrderUtil;


public abstract class BasePay<T> {

    public Request assembleRequest(String method) throws Exception {
        return Request.builder()
                .mess(OrderUtil.getMess())
                .timestamp(Integer.parseInt(String.valueOf(System.currentTimeMillis()/1000)))
                .sign_type("rsa")
                .method(method)
                .build().encData(assembleParam());
    }

    public abstract T assembleParam();

}
